

package com.android.sharedata.provider;

import android.net.Uri;
import android.provider.BaseColumns;

public final class ShareDataContract {

	public static final String AUTHORITY = "com.android.sharedata.provider";
	
	private static final String SCHEME = "content://";
	
	
public static final class Sent implements BaseColumns {
		
		//renseignement sur le nom et les champs de la table
		protected static final String TABLE_NAME = "sent";
		public static final String TITLE = "title";
		public static final String DATE = "date";
		public static final String SYNC_STATUS = "sync_status";		
		public static final String ID_FILE = "id_file";
		
		//information complementaire pour la definition URI
		public static final Uri CONTENT_URI = Uri.parse(SCHEME+AUTHORITY+"/"+TABLE_NAME);
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.android.share.sent";
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.android.share.sent";
		
		/*Valeurs de la colonne status */
		public static final int STATUS_SENT = 1;
		public static final int STATUS_TO_DELETE = 2;
		public static final int STATUS_TO_SEND = 3;
	}

	public static final class Received implements BaseColumns {
		
		//renseignement sur le nom et les champs de la table
		protected static final String TABLE_NAME = "received";
		public static final String TITLE ="title";
		public static final String ID_RECEIVED = "id_received";		
		public static final String SYNC_STATUS = "sync_status";		
		public static final String ID_FILE = "id_file";
		public static final String DATE = "date";
		public static final String FROM_LOGIN = "from_login";
		
		//information complementaire pour la definition URI
		public static final Uri CONTENT_URI = Uri.parse(SCHEME+AUTHORITY+"/"+TABLE_NAME);
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.android.share.received";
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.android.share.received";		
		
		/*Valeurs de la colonne status */
		public static final int STATUS_RECEIVED = 1;
		public static final int STATUS_TO_DELETE = 2;
		public static final int STATUS_TO_RECEIVED = 3;
	}
	
	public static final class Contact implements BaseColumns {
		
		//renseignement sur le nom et les champs de la table
		protected static final String TABLE_NAME = "contact";		
		public static final String ID_CONTACT = "id_contact";
		public static final String ID_SHARE = "id_share";
		
		//information complementaire pour la definition URI
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.android.share.contact";
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.android.share.contact";	
		public static final Uri CONTENT_URI = Uri.parse(SCHEME+AUTHORITY+"/"+TABLE_NAME);
	}
	
	public static final class Files implements BaseColumns{
		//renseignement sur le nom et les champs de la table
		protected static final String TABLE_NAME = "file";
//		public static final String ID_FILE = "id_file";
		public static final String TYPE_MIME = "type_mime";
		public static final String URL_SYSTEM = "url_system";
		
		//information complementaire pour la definition URI
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.upmf.share.file";
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.android.share.file";	
		public static final Uri CONTENT_URI = Uri.parse(SCHEME+AUTHORITY+"/"+TABLE_NAME);
		
	}
}
